/**
 * Copyright (c) 2006 RiseSoft Co.,Ltd  
 * $Header$
 */
package cn.newtest.bi.collection.model;

import java.io.Serializable;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.GenericGenerator;

/**
 *
 *
 * @author <a href="mailto: chenjian@risesoft.net">陈健</a>
 * @version $Revision$
 * 
 */
@Entity
@org.hibernate.annotations.Entity(dynamicInsert=true,dynamicUpdate=true)
@Table(name="Rpt_SoType")
@Cache(usage=CacheConcurrencyStrategy.READ_WRITE)
public class SoType implements Serializable {
	
	private static final long serialVersionUID = -5603703149648653055L;

	@Id
	@Column(name="SoType_Guid",length=38)
	@GenericGenerator(name="SoType-assigned",strategy="assigned")
	private String guid;
	
	@Column(name="SoType_Name",length=64,nullable=false)
	private String name;
	
	@Column(name="SoType_Code",length=64,nullable=false)
	private String code;
	
	@Basic
	private Double tabIndex;
	
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="service_guid")
	private Service service;
	
	public Service getService() {
		return service;
	}
	public void setService(Service service) {
		this.service = service;
	}
	
	public String getGuid() {
		return guid;
	}
	public void setGuid(String guid) {
		this.guid = guid;
	}
	
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	
	public Double getTabIndex() {
		return tabIndex;
	}
	public void setTabIndex(Double tabIndex) {
		this.tabIndex = tabIndex;
	}
}
